<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.35, minimum-scale=0.35, maximum-scale=1, user-scalable=yes">

<title>秭归县委党校智慧校园管理系统</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/admin.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_949625_3t06xc90k9c.css" type="text/css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/font-awesome-4.7.0/css/font-awesome.min.css" type="text/css">
<style>
html, body {
	height: 100%;
	width: 100%;
}

iframe {
	display: block; /* iframes are inline by default */
	background: #000;
	border: none; /* Reset default border */
	height: 100vh; /* Viewport-relative units */
	width: 100vw;
}

.selected {
	/* background-color: #00801c61; */
	background-color: #f2f2f2;
}
.layui-nav-tree .layui-nav-child a {
	color: "#FF0000";
	padding-left: 50px;
}
</style>

</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header1 layui-header" style="height: 60px;">
			<div class="layui-logo" style="width: 250px">
				<img alt="" src="static/images/logo.png">
			</div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<!--   <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="">控制台</a></li>
      <li class="layui-nav-item"><a href="">商品管理</a></li>
      <li class="layui-nav-item"><a href="">用户</a></li>
      <li class="layui-nav-item">
        <a href="javascript:;">其它系统</a>
        <dl class="layui-nav-child">
          <dd><a href="">邮件管理</a></dd>
          <dd><a href="">消息管理</a></dd>
          <dd><a href="">授权管理</a></dd>
        </dl>
      </li>
    </ul> -->
			<ul class="layui-nav layui-nav2 layui-layout-right">
				<li class="layui-nav-item"><a href="javascript:;"> <img
						src="download?uuid=<sec:authentication property="principal.fileuuid" />" class="layui-nav-img"> <span><sec:authorize
								access="hasRole('ROLE_DIY')">开发者</sec:authorize></span> <span><sec:authorize
								access="!hasRole('ROLE_DIY')">
								<sec:authentication property="principal.name" />
							</sec:authorize></span>
				</a> <sec:authorize
						access="!hasRole('ROLE_DIY') and !hasRole('ROLE_ADMIN')">
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;" onclick="pages('student/message')">基本资料</a>
							</dd>
							<dd>
								<a href="javascript:;" onclick="pages('changePwd')">安全设置</a>
							</dd>
						</dl>
					</sec:authorize></li>
				<li class="layui-nav-item"><a href="logout">退出</a></li>
			</ul>
		</div>

		<div class="layui-side layui-bg-red">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				
				
				<ul id="eeed" class="layui-nav layui-nav1 layui-nav-tree" lay-shrink="all" lay-filter="test">
				<sec:authorize access="hasRole('ROLE_STUDENT')">
					<li class="layui-nav-item"><a href="" ><i
								class="layui-icon layui-icon-home" style="font-size: 18px;"></i>&nbsp;<cite>首页</cite></a></li>
				</sec:authorize>
					<c:forEach items="${menus}" var="menu" varStatus="vs">
						<!-- 第一种 没有子标签，自己就是导航栏 -->
						<c:if test="${menu.url!=null}">
							<c:if test="${vs.first}"><li class="layui-nav-item layui-nav-itemed"></c:if>
							<c:if test="${!vs.first}"><li class="layui-nav-item"></c:if>
								<a href="javascript:;"  onclick="pages('${menu.url}')">
								<c:if test="${menu.icon!=null}">
									<i class="layui-icon ${menu.icon}" style="font-size: 18px;"></i>
									<cite>${menu.name}</cite>
								</c:if>
								</a>
							</li>
						</c:if>
						<!-- 第二种 有子标签，自己不是导航栏 -->
						<c:if test="${menu.url==null}">
							<c:if test="${vs.first}"><li class="layui-nav-item layui-nav-itemed"></c:if>
							<c:if test="${!vs.first}"><li class="layui-nav-item"></c:if>
								<a	href="javascript:;">
								<c:if test="${menu.icon!=null}">
									<i class="layui-icon ${menu.icon}" style="font-size: 18px;"></i>
									<cite>${menu.name}</cite>
								</c:if>
								</a>
								<dl class="layui-nav-child">
								<c:forEach items="${menu.children}" var="subMenu">
									<dd>
										<a href="javascript:;" onclick="pages('${subMenu.url}')">${subMenu.name}</a>
									</dd>
								</c:forEach>
								</dl>
							</li>	
						</c:if>
											
					</c:forEach>
				</ul>
			</div>
		</div>

		<div class="layui-body"
			style="border-top: 1px solid red; background: #f7f7f7;">
			<!-- 内容主体区域 -->
			<div id="content" style="padding: 15px;">
				
				<div class="layui-tab-content">
                     <div class="layui-tab-item layui-show">
                         <div class="layui-card">
                             <div class="layui-card-body">
                             <div class="layui-row layui-col-space10">
                                 <fieldset class="layui-elem-field layui-field-title" style="margin-top: 15px;">
                                     <legend>学员须知</legend>
                                 </fieldset>
                                 <div class="layui-collapse" lay-accordion="">
                                 	<c:forEach items="${xyxz }" var="c">
                                 	<c:if test="${c.id==idone }">
                                 		 <div class="layui-colla-item">
	                                         <h2 class="layui-colla-title">${c.title }</h2>
	                                         <div class="layui-colla-content layui-show">
	                                             ${c.content }
	                                         </div>
	                                     </div>
                                 	</c:if>
                                 	<c:if test="${c.id!=idone }">
                                 		 <div class="layui-colla-item">
	                                         <h2 class="layui-colla-title">${c.title }</h2>
	                                         <div class="layui-colla-content">
	                                             ${c.content }
	                                         </div>
	                                     </div>
                                 	</c:if>
                                 	</c:forEach>
                                     
                                 </div>
                                 
                             </div>
                             </div>
                             
                         </div>
                     </div>
                 </div>
			</div>
		</div>
	
		<div class="layui-footer">
			<!-- 底部固定区域 -->
			<!--  © layui.com - 底部固定区域 -->
		</div>
		
	</div>
	<script src="static/js/jquery-1.12.4.min.js"></script>
	<script src="static/layui/layui.all.js"></script>
	<script type="text/javascript" src="static/js/dataTable.js"></script>
	<script type="text/javascript">
	</script>
	<script>
		//JavaScript代码区域
		//JavaScript代码区域
		layui.config({
			base : 'static/layui/'
		}).extend({
			treetable : 'treetable-lay/treetable'
		});

		layui.use('element', function() {
			var element = layui.element;

		});
		function pages(url) {
			$("#content").load(url);
		}
		function datum() {

		}
		
		$(function(){
			$('#eeed>li.layui-nav-item').first().addClass('layui-nav-itemed');
			$('.layui-colla-item .layui-colla-content img').css('height','200px');
		});
		
	</script>
</body>
</html>